﻿<div id="_login" style="display: none; position: fixed; left: 35%; top: 20%; width: 30%; background-color: #c8efc8; border: 10px solid #b9b9b9; ">
    <div class="container-fluid" style="text-align: right; padding-top: 10px; ">
        <a onclick="closeAll()" style="cursor: pointer; "><img src="~/PicRes/close.png" /></a>
    </div>
    <div class="container-fluid" style="padding-top: 40px; padding-bottom: 50px; ">
        @using (Ajax.BeginForm("Login", "Home", null, new AjaxOptions
        {
            HttpMethod = "Post",
            UpdateTargetId = "wrongLogin",
            InsertionMode = InsertionMode.Replace,
            OnSuccess = "reloadLogin()"
        }, new { @class = "form-horizontal" }))
        {
            <div class="col-sm-offset-1" id="wrongLogin" style="padding-left: 3px; margin-bottom: 5px; color: red; font-family: 微软雅黑; font-size: 15px; "></div>
            <div class="form-group">
                <div class="col-sm-offset-1 col-sm-10">
                    <input type="text" id="user-email" name="user-email" class="form-control" placeholder="请输入登陆邮箱" />
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-1 col-sm-10">
                    <input type="password" id="user-key" name="user-key" class="form-control" placeholder="请输入密码" />
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-1 col-sm-4">
                    <div class="checkbox">
                        <label>
                            <input type="checkbox" />自动登录
                        </label>
                    </div>
                </div>
                <div class="col-sm-offset-3 col-sm-3" style="padding-top: 7px; padding-left: 5px; ">
                    <a style="text-decoration: none; cursor: pointer;">忘记密码？</a>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-1 col-sm-4">
                    <button type="submit" class="button button-flat-primary">登 录</button>
                </div>
                <div class="col-sm-offset-2 col-sm-4">
                    <a class="button button-flat-highlight" style="margin-left: 9px; cursor: pointer;" onclick="onlyShowRegister()">注 册</a>
                </div>
            </div>
        }
    </div>
</div>
<script type="text/javascript">
    function reloadLogin() {
        if ($("#wrongLogin").html() == "")
            window.location.reload();
    }
</script>